<!DOCTYPE html>
<html>
<head>
	<title><?php echo $desc." | ".$title ?></title>
	<?php $this->load->view('assets-importer'); ?>

	<?php foreach($post as $post_rec): ?>
		<!-- metas and facebook opengraph -->
		<meta name="robots" content="noodp,noydir"/>
		<meta name="description" content="<?php echo $post_rec['jonu_post_content'] ?>"/>
		<meta name="keywords" content="artikel menarik, artikel bagus, tips kesehatan, hubungan, relationship, hiburan, lifestyle, motivasi, referensi wisata"/>
		<link rel="canonical" href="http://www.olarv.com" />
		<link rel="next" href="http://www.olarv.com/page/2" />
		<link rel="publisher" href="https://plus.google.com/+Olarvcom/about"/>
		<meta property="og:locale" content="en_US" />
		<meta property="og:type" content="website" />
		<meta property="og:title" content="www.olarv.com" />
		<meta property="og:description" content="olarv.com adalah website yang menyajikan berbagai macam artikel menarik, bagus dan bermanfaat untuk dibaca dan dijadikan sebagai acuan atau referensi" />
		<meta property="og:url" content="http://www.olarv.com" />
		<meta property="og:site_name" content="olarv.com" />
		<meta property="article:publisher" content="https://www.facebook.com/olarvcom" />
		<meta property="fb:admins" content="100007675053412" />
		<meta property="og:image" content="http://www.olarv.com/wp-content/uploads/2015/02/fans.jpg" />
		<meta name="twitter:card" content="summary"/>
		<meta name="twitter:description" content="olarv.com adalah website yang menyajikan berbagai macam artikel menarik, bagus dan bermanfaat untuk dibaca dan dijadikan sebgai acuan atau referensi"/>
		<meta name="twitter:title" content="olarv.com % | Kaya dengan Berbagi"/>
		<meta name="twitter:site" content="@olarvcom"/>
		<meta name="twitter:domain" content="olarv.com"/>
		<meta name="twitter:image:src" content="http://www.olarv.com/wp-content/uploads/2015/02/fans.jpg"/>
		<meta name="alexaVerifyID" content="k5YKkSlRLetYZ86yXcF1kCo5lks" />
		<meta name="google-site-verification" content="XLrDoRolIkRrF04viUAjsarWIq6_Q8Wdr3pWNkF6CnA" />
		<meta name="p:domain_verify" content="e45bac3238db314c5d20915ba1acda9a" />
		<!-- [end] metas and facebook opengraph -->
	<?php endforeach; ?>

	<script>(function(d, s, id) {
		var js, fjs = d.getElementsByTagName(s)[0];
		if (d.getElementById(id)) return;
		js = d.createElement(s); js.id = id;
		js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=714619368612187&version=v2.0";
		fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));</script>
</head>
<body>
	<div id="fb-root"></div>
	

	<?php $this->load->view('nav'); ?>

	<div id="outer">
		<div class="container">
			<div id="main-content">
				<?php foreach($post as $post_rec): ?>
					<?php  
					$post_id = $post_rec['jonu_post_id'];
					$post_tgl = substr($post_rec['jonu_post_date'], 8,2);
					$post_bln = substr($post_rec['jonu_post_date'], 5,2);
					$permalink = $post_bln.'/'.$post_tgl.'/'.$post_id.'/'.$post_rec['jonu_post_permalink'];						
					?>
					<h1 class="home-post-title">
						<a href="<?php echo site_url("post/show/$permalink") ?>"><?php echo $post_rec['jonu_post_title'] ?></a>
					</h1>										
					<img class="home-post-img" src="<?php echo base_url("asset/img/posts-image/$post_rec[jonu_post_image]") ?>" width="100%" height="auto"/>
					<div class="home-post-detail">
						<span><i class="fa fa-user fa-fw"></i> <?php echo $post_rec['jonu_user_fullname'] ?></span> 
						<span><i class="fa fa-thumbs-o-up fa-fw"></i> 123</span>
						<span><i class="fa fa-thumbs-o-down fa-fw"></i> 323</span>
						<span><i class="fa fa-folder-open fa-fw"></i> <?php echo $post_rec['jonu_post_view'] ?>x</span>
					</div>
					<div class="home-post-desc">
						<?php echo $post_rec['jonu_post_content'] ?>

						<?php  
						$this->db->join('jonu_post', 'jonu_pc.jonu_post_id = jonu_post.jonu_post_id');
						$this->db->join('jonu_category', 'jonu_pc.jonu_category_id = jonu_category.jonu_category_id');
						$this->db->where('jonu_pc.jonu_post_id', $post_rec['jonu_post_id']);
						$query = $this->db->get('jonu_pc');
						$result = $query->result_array();
						?>
						<div class="post-categories">
							<?php foreach($result as $result_rec): ?>
								<a href="<?php echo site_url("home/category/$result_rec[jonu_category_slug]") ?>"><?php echo $result_rec['jonu_category_alias'] ?></a>
							<?php endforeach; ?>
						</div>
					</div>					
					
					<!-- facebook comment -->
					<h3 class="fb-comment-title"><span>Comment Via Facebook</span></h3>
					<div class="fb-comments" data-href="<?php echo site_url("post/show/$permalink") ?>" data-numposts="25" data-colorscheme="light"></div>
				<?php endforeach; ?>
				<?php 
				$get_post_id = $post[0]['jonu_post_id'];
				if(count($post) == 1){
					mysql_query("UPDATE jonu_post SET jonu_post_view = jonu_post_view+1 WHERE jonu_post_id = $get_post_id");
				}
				?>
			</div>
			<?php $this->load->view('sidebar'); ?>
		</div>
		<div class="container credit">
			Copyright &copy; 2015. <a href="#">Jogja Nuws</a>.
		</div>
	</div>	
</body>
</html>